﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;

namespace dzs.Web.Admin
{
    public class BasePage : System.Web.UI.Page
    {
        public BasePage(): base()
        {

        }

        protected override void OnPreLoad(EventArgs e)
        {
            base.OnPreLoad(e);
            if (Session["login"] == null)
            {
                Response.Redirect("~/jump.html");
            }
        }
        public int getid()
        {
            int id = 0;
            if (Session["login"] != null)
            {
                DataSet ds = Session["login"] as DataSet;
                //int roles_id = Convert.ToInt32(ds.Tables[0].Rows[0]["roles_id"].ToString());
                id = Convert.ToInt32(ds.Tables[0].Rows[0]["user_id"].ToString());
            }

            return id;
        }
       
    }
}